<?php 
defined('BASEPATH') OR exit('No direct script access allowed');

class News extends CI_Model{

	public function newsall()
	{
		$data=$this ->db ->get('news')->result_array();
		return $data;
	}
	public function getnewsone($id)
	{
		$arr=$this ->db ->where('news_id',$id)->get('news')->row_array();
		return $arr;
	}
	// 查询6条数据
	public function newsliu()
	{
		$data=$this ->db ->get('news')->limit(4)->result_array();
		return $data;
	}
}








 ?>